Ext.define('Intranet.Desktop.view.MainScreen', {
    extend: 'Ext.Viewport',
    border: false,
    defaults: {
        border: false
    },
    layout: 'border',
    items: [{
            xtype: 'desktop_companypanel',
            region: 'center'

        }, {
            xtype: 'container',
            region: 'south',
            height: 50,
            margin: '0 0 2 0',
            layout: {
                type: 'hbox'
            },
            items: [{
                    xtype: 'button',
                    width: 48,
                    height: 48,
                    id: 'toolboxBtn',
                    itemId: 'toolboxBtnEl',
                    margin: '0 0 0 3',
                    style: {
                        backgroundColor: 'transparent',
                        border: 'none'
                    }
                    
                }, {
                    xtype: 'panel',
                    flex: 1,
                    layout: {
                        type: 'hbox',
                        align: 'stretch'
                    },
                    height: 50,
                    margin: '0 10 0 10',
                    border: false,
                    bodyStyle: {
                        background: 'transparent'
                    },
                    defaults: {
                        flex: 1
                    },
                    items: [{
                            xtype: 'desktop_teamgroupsview',
                            
                            margin: '0 20 0 0'
                        }, {
                            xtype: 'desktop_personalview'
                        }]

                }]
        }],
    listeners: {
        afterrender: function(thisCmp, opts) {

            var panels = thisCmp.query('panel > panel');

            for (var i = 0; i < panels.length; i++)
            {
                if (panels[i].getHeader()) {
                    panels[i].getHeader().getEl().applyStyles({
                        borderRadius: '7px 7px 0px 0px'
                    });
                }
            }


        }

    }
});
